#ifndef STRUCTS
#define STRUCTS

#include <iostream>

struct point
{
    double x, y;

    bool operator !=(const point&) const;
    bool operator ==(const point&) const;
    bool operator <(const point&) const;
    bool operator <=(const point&) const;

    friend std::istream& operator >>(std::istream& input, point& a)
    {
        input >> a.x;
        input >> a.y;
        return input;
    }

    friend std::ostream& operator <<(std::ostream& output, const point& a)
    {
        output << a.x << " " << a.y;
        return output;
    }

    point(double x1, double y1): x(x1), y(y1) {}
    point(const point& a): x(a.x), y(a.y) {}
    point() {}
};

struct segment
{
    point first, second;

    friend std::istream& operator >>(std::istream& input, segment& a)
    {
        input >> a.first;
        input >> a.second;
        return input;
    }

//    segment(point a, point b): first(a), second(b) {}
};
#endif